﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Gps_TaskDetl数据模型对象
    /// </summary>
    [Serializable]
    public partial class Gps_TaskDetlMod
    {
        /// <summary>
        /// 初始化Gps_TaskDetl数据模型对象
        /// </summary>
        public Gps_TaskDetlMod()
        {
            
        }
        /// <summary>
        /// 初始化Gps_TaskDetl数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="taskID">TaskID</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="state">State</param>
        /// <param name="createTime">CreateTime</param>
        public Gps_TaskDetlMod(long taskID,string deviceNo,int state,DateTime createTime)
        {
            //给TaskID字段赋值
            this.TaskID = taskID;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给State字段赋值
            this.State = state;
            //给CreateTime字段赋值
            this.CreateTime = createTime;
        }
        /// <summary>
        /// 初始化Gps_TaskDetl数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="taskID">TaskID</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="state">State</param>
        /// <param name="createTime">CreateTime</param>
        /// <param name="fetchTime">FetchTime</param>
        /// <param name="sendTime">SendTime</param>
        /// <param name="answerTime">AnswerTime</param>
        /// <param name="rValue">RValue</param>
        public Gps_TaskDetlMod(long taskID,string deviceNo,int state,DateTime createTime,DateTime? fetchTime,DateTime? sendTime,DateTime? answerTime,string rValue)
        {
            //给TaskID字段赋值
            this.TaskID = taskID;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给State字段赋值
            this.State = state;
            //给CreateTime字段赋值
            this.CreateTime = createTime;
            //给FetchTime字段赋值
            this.FetchTime = fetchTime;
            //给SendTime字段赋值
            this.SendTime = sendTime;
            //给AnswerTime字段赋值
            this.AnswerTime = answerTime;
            //给RValue字段赋值
            this.RValue = rValue;
        }
        
		//属性存储数据的变量
        private long _taskID;
        private string _deviceNo;
        private int _state;
        private DateTime _createTime;
        private DateTime? _fetchTime;
        private DateTime? _sendTime;
        private DateTime? _answerTime;
        private string _rValue;
        
        /// <summary>
        /// TaskID
        /// </summary>
        public long TaskID
        {
            get { return this._taskID; }
            set { this._taskID = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// State
        /// </summary>
        public int State
        {
            get { return this._state; }
            set { this._state = value; }
        }
        /// <summary>
        /// CreateTime
        /// </summary>
        public DateTime CreateTime
        {
            get { return this._createTime; }
            set { this._createTime = value; }
        }
        /// <summary>
        /// FetchTime
        /// </summary>
        public DateTime? FetchTime
        {
            get { return this._fetchTime; }
            set { this._fetchTime = value; }
        }
        /// <summary>
        /// SendTime
        /// </summary>
        public DateTime? SendTime
        {
            get { return this._sendTime; }
            set { this._sendTime = value; }
        }
        /// <summary>
        /// AnswerTime
        /// </summary>
        public DateTime? AnswerTime
        {
            get { return this._answerTime; }
            set { this._answerTime = value; }
        }
        /// <summary>
        /// RValue
        /// </summary>
        public string RValue
        {
            get { return this._rValue; }
            set { this._rValue = value; }
        }
        
        /// <summary>
        /// 对比两个Gps_TaskDetl数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Gps_TaskDetl数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Gps_TaskDetl数据模型对象
            Gps_TaskDetlMod gps_TaskDetlMod = obj as Gps_TaskDetlMod;
            //判断是否转换成功
            if (gps_TaskDetlMod == null) return false;
            //进行匹配属性的值
            return
                //判断TaskID是否一致
                this.TaskID == gps_TaskDetlMod.TaskID &&
                //判断DeviceNo是否一致
                this.DeviceNo == gps_TaskDetlMod.DeviceNo &&
                //判断State是否一致
                this.State == gps_TaskDetlMod.State &&
                //判断CreateTime是否一致
                this.CreateTime == gps_TaskDetlMod.CreateTime &&
                //判断FetchTime是否一致
                this.FetchTime == gps_TaskDetlMod.FetchTime &&
                //判断SendTime是否一致
                this.SendTime == gps_TaskDetlMod.SendTime &&
                //判断AnswerTime是否一致
                this.AnswerTime == gps_TaskDetlMod.AnswerTime &&
                //判断RValue是否一致
                this.RValue == gps_TaskDetlMod.RValue;
        }
        /// <summary>
        /// 将当前Gps_TaskDetl数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Gps_TaskDetl数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将TaskID进行按位异或运算处理
                this.TaskID.GetHashCode() ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将State进行按位异或运算处理
                this.State.GetHashCode() ^
                //将CreateTime进行按位异或运算处理
                this.CreateTime.GetHashCode() ^
                //将FetchTime进行按位异或运算处理
                (this.FetchTime == null ? 2147483647 : this.FetchTime.GetHashCode()) ^
                //将SendTime进行按位异或运算处理
                (this.SendTime == null ? 2147483647 : this.SendTime.GetHashCode()) ^
                //将AnswerTime进行按位异或运算处理
                (this.AnswerTime == null ? 2147483647 : this.AnswerTime.GetHashCode()) ^
                //将RValue进行按位异或运算处理
                (this.RValue == null ? 2147483647 : this.RValue.GetHashCode());
        }
        /// <summary>
        /// 将当前Gps_TaskDetl数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Gps_TaskDetl数据模型对象转换成字符串副本
            return
                "[" +
                //将TaskID转换成字符串
                this.TaskID + "," +
                //将DeviceNo转换成字符串
                this.DeviceNo + "," +
                //将State转换成字符串
                this.State + "," +
                //将CreateTime转换成字符串
                this.CreateTime +
                "]";
        }
    }
}
